package com.feng.chat.service;

import com.feng.chat.dto.Result;
import com.feng.chat.dto.UserDTO;
import com.feng.chat.entity.Users;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author dyf
 * @since 2022-05-31
 */
public interface IUsersService extends IService<Users> {
    //登录
    public Result login(HttpServletRequest request,UserDTO userDTO);

    //登录
    public Result register(UserDTO userDTO);

    public Result usersSetting(Integer id);

    //头像上传
    public Result avatar(MultipartFile file);

    //个人详细信息
    public Result usersDetail(Integer uid);

    //修改个人信息
    public Result changeDetail(Integer uid, String avatar, Integer gender, String motto, String nickname);

    //修改密码
    public Result changePassword(Integer uid, String new_password, String old_password);

    //绑定邮箱
    public Result changeEmail(Integer uid, String email, String email_code, String password, HttpSession session);

    //绑定手机
    public Result changeMobile(Integer uid, String mobile, String password, String sms_code, HttpSession session);

    //退出登录
    public Result logout(Integer uid);
}
